for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
$(document).on('ready', function () {
var scanner = new Instascan.Scanner({ video: document.getElementById('preview') });
Instascan
/** global: Instascan */
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.
scanner.addListener('scan', function (content) {
$('input[name="ticketId"]').val(content);
$('#qr').hide();
$('button[name="submit"]').click();
scanner.stop();
});
Instascan.Camera.getCameras().then(function (cameras) {
if (cameras.length > 0) {
scanner.start(cameras[0]);
$('#qr').show();
} else {
console.error('No cameras found.');
}
}).catch(function (e) {
console.error(e);
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.